<html>
<head><meta charset="utf-8"><title>I-prioritize #74282 ICE(expected defining type in borrowck)… · t-compiler/wg-prioritization/alerts · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/index.html">t-compiler/wg-prioritization/alerts</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html">I-prioritize #74282 ICE(expected defining type in borrowck)…</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220533622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220533622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220533622">(Dec 20 2020 at 19:34)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="3111">@WG-prioritization/alerts</span> issue <a href="https://github.com/rust-lang/rust/issues/74282">#74282</a> has been requested for prioritization.</p>
<h1><a href="https://forge.rust-lang.org/compiler/prioritization/procedure.html#assign-priority-to-unprioritized-issues-with-i-prioritize-label">Procedure</a></h1>
<ul>
<li>Priority?</li>
<li>Regression?</li>
<li>Notify people/groups?</li>
<li>Needs <code>I-nominated</code>?</li>
</ul>



<a name="220538014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538014">(Dec 20 2020 at 21:21)</a>:</h4>
<p>This code uses a nightly feature, but it's so simple and the bug is so weird that I feel it should be P-high.</p>



<a name="220538016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538016">(Dec 20 2020 at 21:21)</a>:</h4>
<p>Also it's a regression from 1.43.</p>



<a name="220538058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538058">(Dec 20 2020 at 21:22)</a>:</h4>
<p>Specifically, this part is really weird:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">error</span><span class="p">[</span><span class="n">E0308</span><span class="p">]</span>: <span class="nc">mismatched</span><span class="w"> </span><span class="n">types</span><span class="w"></span>
<span class="w">  </span><span class="o">-</span>-&gt; <span class="nc">src</span><span class="o">/</span><span class="n">lib</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">8</span>:<span class="mi">15</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w"></span>
<span class="mi">3</span><span class="w">  </span><span class="o">|</span><span class="w">   </span><span class="k">type</span> <span class="nc">Closure</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="nb">Fn</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="kt">u64</span><span class="p">;</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w">                  </span><span class="o">----------------</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">expected</span><span class="w"> </span><span class="n">opaque</span><span class="w"> </span><span class="k">type</span>
<span class="o">..</span><span class="p">.</span><span class="w"></span>
<span class="mi">8</span><span class="w">  </span><span class="o">|</span><span class="w">       </span><span class="n">Anonymous</span><span class="p">(</span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w">  </span><span class="n">_______________</span><span class="o">^</span><span class="w"></span>
<span class="mi">9</span><span class="w">  </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w">         </span><span class="mi">3</span><span class="w"></span>
<span class="mi">10</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w">     </span><span class="p">})</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="n">_____</span><span class="o">^</span><span class="w"> </span><span class="n">expected</span><span class="w"> </span><span class="n">opaque</span><span class="w"> </span><span class="k">type</span><span class="p">,</span><span class="w"> </span><span class="n">found</span><span class="w"> </span><span class="n">closure</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w"></span>
<span class="w">   </span><span class="o">=</span><span class="w"> </span><span class="n">note</span>: <span class="nc">expected</span><span class="w"> </span><span class="n">opaque</span><span class="w"> </span><span class="k">type</span> <span class="err">`</span><span class="k">impl</span><span class="w"> </span><span class="nb">Fn</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span><span class="err">`</span><span class="w"></span>
<span class="w">                  </span><span class="n">found</span><span class="w"> </span><span class="n">closure</span><span class="w"> </span><span class="err">`</span><span class="p">[</span><span class="n">closure</span><span class="o">@</span><span class="n">src</span><span class="o">/</span><span class="n">lib</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">8</span>:<span class="mi">15</span>: <span class="mi">10</span>:<span class="mi">6</span><span class="p">]</span><span class="err">`</span><span class="w"></span>
</code></pre></div>
<p>The compiler says it expected <code>impl Fn&lt;()&gt;</code>, but the actual type is <code>impl Fn() -&gt; u64</code> – it's missing the return type?</p>



<a name="220538061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538061">(Dec 20 2020 at 21:22)</a>:</h4>
<p><del>we deactive parts of our opaque types handling without the feature gate</del></p>



<a name="220538064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538064">(Dec 20 2020 at 21:23)</a>:</h4>
<p>ah, the <code>impl Fn&lt;()&gt;</code> part is a bit weird</p>



<a name="220538071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538071">(Dec 20 2020 at 21:23)</a>:</h4>
<p>Yeah, and the feature gate (<code>#![feature(type_alias_impl_trait)]</code>) is <strong>enabled</strong> here.</p>



<a name="220538074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538074">(Dec 20 2020 at 21:23)</a>:</h4>
<p>It also seems like it's rendering the impl trait wrong: it should be <code>impl Fn()</code></p>



<a name="220538112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538112">(Dec 20 2020 at 21:24)</a>:</h4>
<p>(Or something like that)</p>



<a name="220538120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538120">(Dec 20 2020 at 21:24)</a>:</h4>
<p>do we have a policy here? I don't think that it makes sense to prioritize errors which require feature gates</p>



<a name="220538123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538123">(Dec 20 2020 at 21:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="307537">Camelid</span> <a href="#narrow/stream/245100-t-compiler.2Fwg-prioritization.2Falerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6/near/220538074">said</a>:</p>
<blockquote>
<p>It also seems like it's rendering the impl trait wrong: it should be <code>impl Fn()</code></p>
</blockquote>
<p><code>Fn&lt;()&gt;</code> is how the trait is defined: <a href="https://doc.rust-lang.org/std/ops/trait.Fn.html">https://doc.rust-lang.org/std/ops/trait.Fn.html</a></p>



<a name="220538124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538124">(Dec 20 2020 at 21:24)</a>:</h4>
<p>or would say that all of them are <code>P-low</code></p>



<a name="220538132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538132">(Dec 20 2020 at 21:25)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=c8dde47313b03c4c2b7c6b33d14869af">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=c8dde47313b03c4c2b7c6b33d14869af</a> is more interesting imo</p>



<a name="220538133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538133">(Dec 20 2020 at 21:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/245100-t-compiler.2Fwg-prioritization.2Falerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6/near/220538123">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="307537">Camelid</span> <a href="#narrow/stream/245100-t-compiler.2Fwg-prioritization.2Falerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6/near/220538074">said</a>:</p>
<blockquote>
<p>It also seems like it's rendering the impl trait wrong: it should be <code>impl Fn()</code></p>
</blockquote>
<p><code>Fn&lt;()&gt;</code> is how the trait is defined: <a href="https://doc.rust-lang.org/std/ops/trait.Fn.html">https://doc.rust-lang.org/std/ops/trait.Fn.html</a></p>
</blockquote>
<p>which is an unstable implementation detail, so maybe still a bug, but an understandable one</p>



<a name="220538139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538139">(Dec 20 2020 at 21:25)</a>:</h4>
<p>but probably also close to <code>P-low</code> imo</p>



<a name="220538194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538194">(Dec 20 2020 at 21:26)</a>:</h4>
<p>Since you and <span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> both seem to think P-low, I'll go with that :)</p>
<p>We have a big queue of issues to prioritize from <span class="user-mention silent" data-user-id="217864">matthiaskrgr</span>'s work identifying regressions.</p>



<a name="220538211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2374282%20ICE%28expected%20defining%20type%20in%20borrowck%29%E2%80%A6/near/220538211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2374282.20ICE(expected.20defining.20type.20in.20borrowck).E2.80.A6.html#220538211">(Dec 20 2020 at 21:27)</a>:</h4>
<p>Issue <a href="https://github.com/rust-lang/rust/issues/74282">#74282</a>'s prioritization request has been removed.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>